#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
//priority_queue<int,vector<int> >
//next_permutation

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin >> n;
    vector<int>a;
    map<int,int>b;
    for (int i = 0; i < n; i++)
    {
        int x;
        cin >> x;
        if (b[x] == 0)
        {
            a.pb(x);
        }
        b[x]++;
    }
    sort(a.begin(),a.end());
    int s = b[a[0]], ans = n;
    for (int i = 1; i < a.size(); i++)
    {
        if (b[a[i]] > s)
        {
            ans -= s;
            s = 0;
        }
        else
        {
            ans -= b[a[i]];
            s -= b[a[i]];
        }
        s += b[a[i]];
    }
    cout << ans << endl;
    return 0;
}
